<template>
  <div>
    <TCollapse title="查询条件">
      <el-form ref="form" :model="params" label-width="130px" size="mini" :inline="true">
        <el-row :gutter="24">
          <el-col :span="5" v-for='item in formItem' :key='item.value'>
            <el-form-item :label="item.label" prop="ifDivideSpv" style="width: 100%">
              <el-input v-model='params[item.value]' placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-button @click='getTable' size='mini'>查询</el-button>
          </el-col>
          <el-col :span="5">
            <el-form-item label="当前节点" prop="nodeName" style="width: 100%">
              <el-select v-model="params.nodeName" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </TCollapse>
    <TCollapse title="查询结果">
     <div>
       <accButton :prj-id="prjId" :select-list='selectList' :btn-list="btnOptions" />
       <accTable ref='accTable' @changeCheck='handleCheck' :tableHeader='tableHeader'  :table-data='tableData'></accTable>
     </div>
    </TCollapse>
  </div>
</template>
<script>
import {Mixins} from "@/views/acceptance/components/minix";
import {tableMinix} from "@/views/acceptance/components/tableMinix";

export default {
  name: 'siteList',
  components: {
    accButton:() => import('./accButton.vue'),
    accTable: () => import('./table.vue'),
  },
  mixins: [Mixins,tableMinix],
  data(){
    return {
      btnList: ['materialBinding', 'materialService', 'serviceEdit', 'entering', 'check'],
      params:{
        prjCode: '',
        projectName: '',
        siteId: '',
        siteName: '',
        nodeName: '',
        pageNum: 1,
        pageSize: 999,
      },
      formItem: [
        {
          label: '项目编码',
          value: 'prjCode'
        },
        {
          label: '项目名称',
          value: 'projectName'
        },
        {
          label: '站址编码',
          value: 'siteId'
        },
        {
          label: '站址名称',
          value: 'siteName'
        }
      ],
      options:[
        {
          label: '资源录入',
          value: '资源录入'
        },
        {
          label: '资源确认',
          value: '资源确认'
        },
        {
          label: '内部验收',
          value: '内部验收'
        }
      ]
    }
  },

}
</script>
<style scoped lang='scss'>
</style>
